package com.huiminpay.message;

import com.huiminpay.model.Order;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Component;

/**
 * @ClassName ConsumerSimple
 * @Author: longlong
 * @CreateDate: 2023/12/18 11:45
 */

@Component
@RocketMQMessageListener(topic = "my-topic-order", consumerGroup = "demo-producer-group2")
public class ConsumerSimple2 implements RocketMQListener<Order> {

    @Override
    public void onMessage(Order order) {
        System.out.println(order);
        System.out.println(order.getTitle());
    }
}
